<template>
  <div>
    <h1>数据位子级的数据：{{childMessage}}</h1>
    <Child :msg="message" @sendData="sd"></Child>
    <Sister></Sister>
    <Brother></Brother>
  </div>
</template>

<script>
import Child from './components/Child'
import Sister from './components/Sister'
import Brother from './components/Brother'

export default {
  components: {
    Child,
    // 父传子
    Sister,
    Brother
  },
  data(){
    return {
      message:"hello child",
      childMessage:""
    }
  },
  methods:{
    sd(a){
      this.childMessage = a;
    }
  }
}
</script>

<style>

</style>
